]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspaces-view: Set geometry on new workspaces
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 1 Jun 2011 12:47:51 +0000 (14:47 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 3 Jun 2011 17:56:33 +0000 (19:56 +0200)
Currently the workspace geometry is updated on zoom/allocation
changes, which means that newly added workspaces use their initial
geometry of (0, 0, 0, 0) until the next zoom change. As a result,
windows on the affected workspaces are mispositioned, e.g. placed
outside the workspace area. To fix, set the geometry on newly added
workspaces to the view's cached values.

https://bugzilla.gnome.org/show_bug.cgi?id=649001

js/ui/workspacesView.js

index 05358a1a55b3cf5f8abe015b9cd9515ced730cc3..573a1b8948c11285058957dc88c5cd69257d06bc 100644 (file)
@@ -275,8 +275,11 @@ WorkspacesView.prototype = {
                          });
 
         if (newNumWorkspaces > oldNumWorkspaces) {
-            for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++)
+            for (let w = oldNumWorkspaces; w < newNumWorkspaces; w++) {
+                this._workspaces[w].setGeometry(this._x, this._y,
+                                                this._width, this._height);
                 this.actor.add_actor(this._workspaces[w].actor);
+            }
 
             this._updateWorkspaceActors(false);
         }